<template>
  <!--常规布局 -->
  <div class="layout-common">
    <div class="layout-header" style="display: none">
      <vui-header layout="common" />
    </div>
    <div
      class="vui-main main-padding vui-pda"
      :class="{
        'is-collapse-main': collapse,
      }"
    >
      <vui-app-main />
    </div>
  </div>
</template>

<script>
  import { defineComponent } from 'vue'

  export default defineComponent({
    name: 'LayoutPda',
    props: {
      collapse: {
        type: Boolean,
        default() {
          return false
        },
      },
      fixedHeader: {
        type: Boolean,
        default() {
          return true
        },
      },
      showTabs: {
        type: Boolean,
        default() {
          return true
        },
      },
      device: {
        type: String,
        default() {
          return 'desktop'
        },
      },
    },
    setup() {
      let hasPda = process.env.VUE_APP_BuildProject === 'pda'
      return {
        hasPda,
      }
    },
  })
</script>

<style lang="scss" scoped>
  .layout-common {
    height: 100%;
    .vui-main {
      height: 100%;
      .fixed-header {
        left: $base-left-menu-width;
        width: $base-right-content-width;
      }
    }
    .layout-header {
      height: 50px;
    }

    :deep() {
      .vui-tabs-content {
        width: calc(100% - #{$base-font-size-default} - #{$base-padding} - 2px) !important;
      }

      .vui-header {
        .vui-main {
          width: 100%;
          margin: auto 0;
        }
      }
    }
  }
</style>
